package com.note.app.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 手机号验证码登录DTO
 */
@Data
@Schema(description = "手机号验证码登录请求")
public class MobileLoginDTO {
    
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号", required = true, example = "13800138000")
    private String mobile;
    
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "^\\d{6}$", message = "验证码必须为6位数字")
    @Schema(description = "验证码", required = true, example = "123456")
    private String code;
    
    @Schema(description = "设备类型", example = "WEB")
    private String deviceType = "WEB";
    
    @Schema(description = "设备信息", example = "Chrome 98.0.4758.102")
    private String deviceInfo;
    
    @Schema(description = "登录IP", example = "192.168.1.1")
    private String loginIp;
} 